import {post,get} from '@/utils/http'
import type {ILoginFormType,ILoignResultType} from '@/typings/userType'
import type {IRegisterResult} from '@/typings/RegisterUser'
//用户登录
export const doUserLogin = (userData:ILoginFormType)=>
    post<ILoignResultType>('/api/login',userData)

//预约用户的列表
// getRegisterUserApi
export const getRegisterUserApi = (currentPage=1,pageSize=10)=>
    get<IRegisterResult>(`/api/register?currentPage=${currentPage}&pageSize=${pageSize}`)

//查询预约用户的列表
export const postRegisterUserApi = (currentPage=1,pageSize=10,formdata={})=>
post<IRegisterResult>(`/api/registerc?currentPage=${currentPage}&pageSize=${pageSize}`,formdata)

// 批量添加用户数据
export const batchAddUserApi = users => post(`/api/user/batchAddUser`, { users })

